using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;

public class Grden : MonoBehaviour
{
    private List<Map.Bounds> cellsBounds = Map.CellsBounds;
    private GameObject cellPrefab;
    private Transform grdenTransform;

    private void Awake()
    {
        
    }

    private void Start()
    {
        cellPrefab = ResourceManager.Instance.Cell;
        TryGetComponent<Transform>(out grdenTransform);
        CreateCellsForGrden();
    }

    private void CreateCellsForGrden()
    { 
        foreach (var cellBounds in cellsBounds)
        {
            Instantiate(cellPrefab, cellBounds.center, grdenTransform.rotation, grdenTransform);
        }
    }



}

